//
//  MTRankViewController.m
//  MotorTravel
//
//  Created by zk on 16/9/12.
//  Copyright © 2016年 zk. All rights reserved.
//

#import "MTRankViewController.h"
#import "InformationCategaryScrollView.h"
#import "MTRankTableViewCell.h"

@interface MTRankViewController ()
<
InformationCategoryScrollViewDelegate,
UITableViewDelegate,
UITableViewDataSource
>
@property (weak, nonatomic) IBOutlet InformationCategaryScrollView *categoryView;
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (nonatomic, strong) NSMutableArray *topicArray;

@end

@implementation MTRankViewController

#pragma mark - life cycle
- (void)viewDidLoad {
    [super viewDidLoad];
    [self loadBaseUI];
    // Do any additional setup after loading the view.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)loadBaseUI {
    self.tableView.delegate = self;
    self.tableView.dataSource = self;
    self.tableView.tableFooterView = [UIView new];
}

#pragma mark - tableview datasource 

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return self.topicArray.count;
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
    MTRankTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"MTRankTableViewCell"];
    return cell;
}

#pragma mark - InformationCategoryScrollViewDelegate

- (void)buttonClickWithCateId:(NSInteger)cateId {
    
}

#pragma mark - Setter & Getter

- (NSMutableArray *)topicArray {
    if (!_topicArray) {
        _topicArray = [[NSMutableArray alloc] init];
    }
    return _topicArray;
}

@end
